# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=py3-plac
pkgver=1.2.0
pkgrel=0
pkgdesc="Parsing the command line the easy way"
url="https://github.com/micheles/plac"
arch="noarch"
license="BSD-2-Clause"
depends="python3 py3-argparse"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-sqlsoup"
subpackages="$pkgname-doc"
source="https://files.pythonhosted.org/packages/source/p/plac/plac-$pkgver.tar.gz
	index.rst" # replicate index.rst for tests to pass
builddir="$srcdir/plac-$pkgver"

build() {
	python3 setup.py build
}

check() {
	cp "$srcdir/index.rst" "$builddir/doc/index.rst"
	PYTHONPATH="$PWD/build/lib" pytest-3
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	install -Dm644 README.rst "$pkgdir/usr/share/doc/$pkgname/README.rst"
}

sha512sums="666f08900016a234232cde83b7adebbeff12167c68bcd32fc7e04012402140a5e6670020ef6310b2bfcf0de3175ae24696afea66760be1b3cae3c0b643e8999c  plac-1.2.0.tar.gz
763e0838200a4dc25c4d4a74a9dc5b8ff8c32f5e67d00207a9f43274ad42eff1e0c6f08d04dc7123967d9426231d1ba3b0f0e8c0fcc688a528389e22f5b4c477  index.rst"
